package cn.tedu.hhmc.disease.service.impl;

import java.util.List;

import cn.tedu.hhmc.disease.mapper.DiseaseMapper;
import cn.tedu.hhmc.disease.pojo.entity.Disease;
import cn.tedu.hhmc.disease.pojo.vo.DiseaseVO;
import cn.tedu.hhmc.disease.service.DiseaseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 疾病种类Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-05
 */
@Slf4j
@Service
public class DiseaseServiceImpl implements DiseaseService
{
    @Autowired
    private DiseaseMapper diseaseMapper;

    /**
     * 查询疾病种类
     * 
     * @param id 疾病种类主键
     * @return 疾病种类
     */
    @Override
    public DiseaseVO selectDiseaseById(Long id)
    {
        return diseaseMapper.selectDiseaseById(id);
    }

    /**
     * 查询疾病种类列表
     * 
     * @param disease 疾病种类
     * @return 疾病种类
     */
    @Override
    public List<DiseaseVO> selectDiseaseList(Disease disease)
    {
        log.debug("查询疾病种类列表业务,参数:无");
        return diseaseMapper.selectDiseaseList(disease);
    }

    /**
     * 新增疾病种类
     * 
     * @param disease 疾病种类
     * @return 结果
     */
    @Override
    public int insertDisease(Disease disease)
    {
        return diseaseMapper.insertDisease(disease);
    }

    /**
     * 修改疾病种类
     * 
     * @param disease 疾病种类
     * @return 结果
     */
    @Override
    public int updateDisease(Disease disease)
    {
        return diseaseMapper.updateDisease(disease);
    }

    /**
     * 批量删除疾病种类
     * 
     * @param ids 需要删除的疾病种类主键
     * @return 结果
     */
    @Override
    public int deleteDiseaseByIds(Long[] ids)
    {
        return diseaseMapper.deleteDiseaseByIds(ids);
    }

    /**
     * 删除疾病种类信息
     * 
     * @param id 疾病种类主键
     * @return 结果
     */
    @Override
    public int deleteDiseaseById(Long id)
    {
        return diseaseMapper.deleteDiseaseById(id);
    }
}
